<?php

namespace app\v1\controller;

use app\v1\logic\ToolsLogic;
use think\response\Json;

class Tools extends BaseController
{
    public function getCity()
    {
        $data = ToolsLogic::getCity($this->param);
        return successReturn($data);
    }

    public function upload(): Json
    {
        [$res, $msgOrData] = (new ToolsLogic())->upload($this->param, $this->userId);
        if (!$res) return errorReturn(4001, $msgOrData);
        return successReturn($msgOrData);
    }
}